  <div id="mainBody">

  <h3>Purchase New Shares</h3>
  <%= error_messages_for 'operation' %>
  <%= start_form_tag :action => 'purchaseNewAction' %>
  <div class="operations" id="wallet">
    <table>
      <tbody>
        <tr>
          <th>Account</th>
          <th>Name</th>
          <th>Date/Time</th>
          <th>Quantity</th>
          <th>Price</th>
          <th>Brokerage</th>
        </tr>
        <tr>
          <td><%= select('group', 'account_id', Account.find_all.collect {|account| [account.name, account.id]}) %></td>
          <td><%= select( 'group', 'share_id',  Share.find_all.collect  {|share| [share.name, share.id]}) %></td>
          <td><%= datetime_select 'operation', 'timestamp'  %></td>
          <td><%= text_field 'operation', 'quantity', 'size'=>3  %></td>
          <td><%= text_field 'operation', 'price', 'size'=>5  %></td>
          <td><%= text_field 'operation', 'brokerage', 'size'=>5  %></td>
          <td></td>
        </tr>
        <tr>
          <td colspan="6" align="right">
            <%= submit_tag "Buy" %>
            <%= tag 'input', 'name' => 'Cancel', 'value' => 'Cancel', 'type' => 'button',
                                       'onclick' => "document.location='" + url_for(:controller => 'index', :action => 'index') + "/'" %></td>
        </tr>
      </tbody>
    </table>
  </div>
  <%= end_form_tag %>
</div>
